package no.ntnu.fp.su;

import java.sql.Timestamp;

/**
 * comment for use together with logentries
 * 
 * @author abs
 * 
 */
public class Comment {

	int commentID;
	String comment;
	Timestamp time;

	/**
	 * Create new Comment
	 * 
	 * @param {@link Integer} <br>
	 *        ID of the new Comment
	 * @param {@link String} <br>
	 *        content of the comment
	 */
	public Comment(int id, String c) {
		commentID = id;
		comment = c.toString();
		this.time = new Timestamp(System.currentTimeMillis());
	}

	/**
	 * Create new Comment, based on comments loaded from database
	 * 
	 * @param {@link Integer} <br>
	 *        ID of the new Comment
	 * @param {@link String} content of the comment
	 *@param {@link Timestamp} time of the comment
	 */
	public Comment(int id, String c, Timestamp t) {
		commentID = id;
		comment = c.toString();
		this.time = t;
	}

	public int getCommentID() {
		return commentID;
	}

	public String getComment() {
		return comment;
	}

	public Timestamp getTimestamp() {
		return this.time;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

}
